package sk.naive.talker;

import sk.naive.talker.persistence.PersistenceException;
import sk.naive.talker.props.PropertyStoreException;

import java.util.Collection;
import java.rmi.RemoteException;

/**
 * ThingFinder.
 *
 * @author <a href="mailto:sue@naive.deepblue.sk">Sue</a>
 * @version $Revision: 1.3 $ $Date: 2007-05-07 10:34:20 $
 */
public interface ThingFinder {
	Thing findThingById(Integer id);
	Thing findThingByTypeAndName(String type, String name);
	Thing findThingForUser(User user);

	Collection<Thing> things(String type);

	Thing createThing(String type, String name) throws PersistenceException, PropertyStoreException;
	void destroy(Thing thing) throws PersistenceException, RemoteException;

	Collection<String> thingTypes();
}
